@extends("layouts.backend.webadmin")

<link rel="stylesheet" href="{{env('APP_ROOT')}}/assets/layui/css/layui.css">
<script src="{{env('APP_ROOT')}}/assets/layui/layui.js"></script>

@section('content')

    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body">
                            <div class="form-group">
                                <label for="vulsCategoryId">漏洞编号</label><br>
                                @foreach ($vuls as $lists)
                                    <blockquote id="vulsCategoryId" class="layui-elem-quote layui-quote-nm">
                                        {{$lists->vuls_number}}
                                    </blockquote>
                                @endforeach
                            </div>
                        @needsroles([2,3])
                            <div class="form-group">
                                <label for="vulsCategoryId">标题</label><br>
                                @foreach ($vuls as $lists)
                                    <blockquote id="vulsCategoryId" class="layui-elem-quote layui-quote-nm">
                                        {{$lists->title}}
                                    </blockquote>
                                @endforeach
                            </div>
                        @endauth
                            <div class="form-group">
                                <label for="vulsCategoryId">副标题</label><br>
                                @foreach ($vuls as $lists)
                                    <blockquote class="layui-elem-quote layui-quote-nm" id="vulsCategoryId">
                                        {{$lists->description}}
                                    </blockquote>
                                @endforeach
                            </div>
                        <div class="form-group">
                            <label for="vulsCategoryId">漏洞URL</label><br>
                            @foreach ($vuls as $lists)
                                <blockquote id="vulsCategoryId" class="layui-elem-quote layui-quote-nm">
                                    {{$lists->form_url}}
                                </blockquote>
                            @endforeach
                        </div>
                        <div class="form-group">
                            <label for="vulsCategoryId">URL参数</label><br>
                            @foreach ($vuls as $lists)
                                <blockquote id="vulsCategoryId" class="layui-elem-quote layui-quote-nm">
                                    {{$lists->url_parms}}
                                </blockquote>
                            @endforeach
                        </div>
                        <div class="form-group">
                            <label for="vulsCategoryId">Payload</label><br>
                            @foreach ($vuls as $lists)
                                <blockquote id="vulsCategoryId" class="layui-elem-quote layui-quote-nm">
                                    {{$lists->payload}}
                                </blockquote>
                            @endforeach
                        </div>
                            <div class="form-group">
                                <label for="vulsCategoryId">漏洞详情</label><br>
                                    <blockquote class="layui-elem-quote layui-quote-nm" id="vulsCategoryId">
                                        {!!$vuls[0]->content  !!}
                                    </blockquote>
                            </div>
                        <div class="form-group">
                            <label for="vulsCategoryId">参考资料</label><br>
                            @foreach($vuls[0]->ref as $ref)
                                <div class="col-md-12">
                                    <a style="padding-left:15px;" target="_blank" href="{{route('knowledge.showpage',['id'=>$ref->id])}}">{{mb_substr($ref->title,0,50)}}</a>
                                </div>
                            @endforeach
                        </div>

                            <div class="form-group">
                                <label for="level">漏洞评级</label><br>
                                <select style="color: red;" class="form-control" disabled lay-filter="level" id="level" name="level">
                                    <option value="">--请选择评级--</option>
                                    @if($level)
                                    @foreach ($level as $lists)
                                            <option @if($lists->id==$vuls[0]->level_id)  selected  @endif
                                            value="{{$lists->id}}">{{$lists->name}}</option>
                                    @endforeach
                                    @endif
                                </select>
                            </div>
                            @if($record)
                                <div class="form-group">
                                    <label for="vulsCategoryId">修复过程</label>
                                    <blockquote class="layui-elem-quote layui-quote-nm">
                                        <ul class="layui-timeline">

                                            @foreach($record as $records)
                                                <li class="layui-timeline-item">
                                                    <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                                    <div class="layui-timeline-content layui-text">
                                                        <h3 class="layui-timeline-title">
                                                            @if($records->created_at)
                                                                {{$records->created_at}}
                                                            @endif
                                                        </h3>
                                                        <ul>
                                                            @if($records->vuls_status)
                                                                <li>
                                                                    状态：{{$status[$records->vuls_status]['name']}}
                                                                </li>
                                                            @endif
                                                                @if($records->creatname)
                                                                    <li>
                                                                        创建者：{{$records->creatname}}({{$records->creal_name}})({{$records->phone}})
                                                                    </li>
                                                                @endif


                                                                @if($records->updatename)
                                                                    <li>
                                                                        更新者：{{$records->updatename}}({{$records->ureal_name}})({{$records->phone}})
                                                                    </li>
                                                                @endif
                                                                @if($records->reward)
                                                                    <li>
                                                                        当前金币：{{$records->reward}}
                                                                    </li>
                                                                @endif
                                                                @if($records->credit)
                                                                    <li>
                                                                        当前积分：{{$records->credit}}
                                                                    </li>
                                                                @endif
                                                            @if($records->content)
                                                                <li>
                                                                    说明：{{$records->content}}
                                                                </li>
                                                            @endif

                                                        </ul>
                                                    </div>
                                                </li>
                                            @endforeach

                                        </ul>
                                    </blockquote>
                                </div>
                            @endif


                    </div>
                </div>
            </div>
        </div>
    </section>
@stop